//广告请求
import request from '../utils/request';
//添加广告请求
export const addAdvRequest = (myForm) => {
  return request.post("/addAdv", myForm)
}
// 查询所有的广告
export const advListRequest = (pageNo=1 , everyNum) => {
  return request.get(`/advList/${pageNo}/${everyNum}`)
}
// 删除广告
export const deleteAdvRequest = (_id) => {
  return request.delete("/deleteAdv", {
    params: {
      _id
    }
  })
}
// 更新广告时获取到当前的广告信息
export const getUpdateDataRequest = (_id) => {
  return request.get("/getUpdateData", {
    params: {
      _id
    }
  })
}
// 更新广告逻辑
export const updateAdvRequest = (formDate, _id) => {
  return request.put("/UpdateAdv", formDate, {
    params: {
      _id
    }
  })
}